package com.ywf.corebase.framework.init;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @ClassName BaseCoreApplicationRunner
 * @Description
 * @Author YWF
 * @Date 2021/6/15 15:11
 */

@Component
@Order(1)
public class BaseCoreApplicationRunner implements ApplicationRunner {

    private final static Logger logger = LoggerFactory.getLogger(BaseCoreApplicationRunner.class);

    @Value("${server.port}")
    private int port;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        logger.info("程序部署完成，访问地址：http://localhost:" + port);
    }
}
